<?php

class Car
{
  public $speed = 10;

  function setspeed($speed)
  {
    $this->speed = $speed;
  }

  function getSpeed()
  {
    return $this->speed;
  }

  function changeGear()
  {
    /// functionality to chnage Gear
  }

  static function kmToMile($km)
  {
    return ($km / 1.5);
  }

  static function sendMail($to,$subject,$message,$header)
  {
    mail($to,$subject,$message,$header);
  }
}


$maruti = new Car;
echo $maruti->speed; // With Object
echo '<hr>';

echo Car::kmToMile(150);// Without Object (:: Scope Resolution Operator)
